

package com.example.administrator.caigou51.recyclerCard.cardView;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.ImageView;
import android.widget.TextView;

import com.example.administrator.caigou51.R;
import com.example.administrator.caigou51.global.App;
import com.example.administrator.caigou51.recyclerCard.basic.CardItemView;
import com.example.administrator.caigou51.recyclerCard.card.HuoDongTongZhiCard;
import com.example.administrator.caigou51.util.ImageUtil;


public class HuoDongTongZhiCardView extends CardItemView<HuoDongTongZhiCard> {
 	private Context mContext;
    private TextView textView_date;
    private ImageView imageViewContent;
    private TextView textView_content;
    public HuoDongTongZhiCardView(Context context) {
        super(context);
        mContext=context;
        // TODO Auto-generated constructor stub
    }

    public HuoDongTongZhiCardView(Context context, AttributeSet attrs) {
        super(context, attrs);
        mContext=context;
        // TODO Auto-generated constructor stub
    }

    public HuoDongTongZhiCardView(Context context,
                                    AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
        mContext=context;
        // TODO Auto-generated constructor stub
    }
    @Override
    public void build(HuoDongTongZhiCard card) {
        // TODO Auto-generated method stub
        super.build(card);
        textView_date = (TextView) findViewById(R.id.textView_date);
        imageViewContent = (ImageView) findViewById(R.id.imageViewContent);
        textView_content = (TextView) findViewById(R.id.textView_content);

        textView_date.setText(card.getDataEntity().getSend_time());
        App.displayImageHttpOrFile(card.getDataEntity().getImage(),imageViewContent, ImageUtil.OptionsActivity());
        textView_content.setText(card.getDataEntity().getContent());
    }
}
